<template>
	<view class="mine">
		<view :class="showPublishPageState?'filter':''">
			<view class="mine-header">
				<view class="bg">
					<image :src="imgbg" mode="">
					</image>
				</view>
				<view class=""
					style="z-index: -1;position: absolute;height: 640rpx;width: 100%;background: rgba(0, 0, 0, 0.6);left: 0;top: 0;">
				</view>
				<view class="" style="height: 88rpx;">

				</view>
				<view class="mine-header-info u-flex u-row-between">
					<view class="mine-header-info-left u-flex">
						<view class="mine-header-info-left-ava" @click="jumpPersonalDataPage()">
							<image :src="imgbg" mode="">
							</image>
						</view>
						<view class="mine-header-info-left-content">
							<view class="mine-header-info-left-content-top u-flex">
								薄荷绿12212
							</view>
							<view class="mine-header-info-left-content-down">
								<view class="mine-header-info-left-content-down-item vip-level">
									Lv.6
								</view>
							</view>
						</view>
					</view>
					<view class="mine-header-info-right u-flex"
						@click="$Router.push({path:'/pages/index/index/index-personaldetail'})">
						<view class="">
							个人主页
						</view>
						<view class="" style="height: 40rpx;">
							<image src="../../static/img/arrow-right.png" style="width: 40rpx;height: 40rpx;" mode="">
							</image>
						</view>
					</view>
				</view>
				<view class="mine-header-sign">
					世界美好又黑暗
				</view>
				<view class="mine-header-tab u-flex">
					<view class="mine-header-tab-item"
						@click="$Router.push({path:'/pages/mine/mine-focus/mine-focus'})">
						<view class="mine-header-tab-item-plus">
							+42
						</view>
						<view class="mine-header-tab-item-top">
							17
						</view>
						<view class="mine-header-tab-item-down">
							关注
						</view>

					</view>
					<view class="mine-header-tab-item" @click="$Router.push({path:'/pages/mine/mine-fans/mine-fans'})"
						style="flex: 2;">
						<view class="mine-header-tab-item-plus">
							+2
						</view>
						<view class="mine-header-tab-item-top">
							171
						</view>
						<view class="mine-header-tab-item-down">
							粉丝
						</view>
					</view>
					<view class="mine-header-tab-item" @click="$Router.push({path:'/pages/mine/mine-come/mine-come'})">
						<view class="mine-header-tab-item-plus">
							+4
						</view>
						<view class="mine-header-tab-item-top">
							17
						</view>
						<view class="mine-header-tab-item-down">
							最近来访
						</view>
					</view>
				</view>
				<view class="mine-header-jump u-flex">
					<view class="mine-header-jump-left" @click="$Router.push({path:'/pages/index/vip/vip'})">
						<view class="mine-header-jump-left-title u-flex">
							<view class="">
								开通会员
							</view>
							<view class="mine-header-jump-left-title-btn">
								开通
							</view>
						</view>
						<view class="mine-header-jump-left-dsc">
							成为会员，享更多权益
						</view>
					</view>
					<view class="mine-header-jump-right"
						@click="$Router.push({path:'/pages/index/mission/candy-mine'})">
						<view class="mine-header-jump-right-title">
							<view class="">
								我的喜糖
							</view>
							<view class="mine-header-jump-right-title-btn">
								充值
							</view>
						</view>
						<view class="mine-header-jump-right-dsc u-flex">
							<image src="../../static/img/index/candy.png" style="width: 28rpx;height: 28rpx;" mode="">
							</image>
							<view class="">
								喜糖：123个
							</view>
						</view>
					</view>
				</view>
			</view>
			<view class="mine-main">
				<mine-settinglist></mine-settinglist>
			</view>
			<u-tabbar :v-model="0" :iconSize="56" :height="100" :midButtonSize="144" inactiveColor="#999999"
				activeColor="#2E3033" :list="tabList" :mid-button="true" @change="changeTab"></u-tabbar>
		</view>
		<publish></publish>
	</view>
</template>

<script>
	//这里可以导入其他文件（比如：组件，工具js，第三方插件js，json文件，图片文件等等）
	import mineSettinglist from '../../components/mine-settinglist/mine-settinglist.vue'
	import publish from '../../components/publish/publish.vue'
	export default {
		// 组件名称
		name: 'demo',
		// 组件参数 接收来自父组件的数据
		props: {},
		// 局部注册的组件,import引入的组件需要注入到对象中才能使用
		components: {
			mineSettinglist,
			publish
		},
		// 组件状态值
		data() {
			return {
				tabList: this.$store.getters.tabList,
				imgbg: "https://picx.zhimg.com/v2-454fe8ff94db42421f409968a6f4e780_l.jpg?source=5a24d060"
			}
		},
		// 计算属性
		computed: {
			showPublishPageState() {
				return this.$store.getters.showPublishPage
			}
		},
		// 侦听器
		watch: {},
		// 组件方法
		methods: {
			jumpPersonalDataPage() {
				this.$Router.push({
					path: '/pages/mine/personal-data/personal-data'
				})
			},
			changeTab(e) {
				if (e == 2) {
					this.$store.commit("changeShowPublishPage", true)
				}
			}
		},
		// 以下是生命周期钩子   注：没用到的钩子请自行删除
		/**
		 * 在实例初始化之后，组件属性计算之前，如data属性等
		 */
		beforeCreate() {},
		/**
		 * 组件实例创建完成，属性已绑定，但DOM还未生成，$ el属性还不存在
		 */
		created() {},
		/**
		 * 在挂载开始之前被调用：相关的 render 函数首次被调用。
		 */
		beforeMount() {},
		/**
		 * el 被新创建的 vm.$ el 替换，并挂载到实例上去之后调用该钩子。
		 * 如果 root 实例挂载了一个文档内元素，当 mounted 被调用时 vm.$ el 也在文档内。
		 */
		mounted() {},
		/**
		 * 数据更新时调用，发生在虚拟 DOM 重新渲染和打补丁之前。
		 * 你可以在这个钩子中进一步地更改状态，这不会触发附加的重渲染过程。
		 */
		beforeUpdate() {},
		/**
		 * 由于数据更改导致的虚拟 DOM 重新渲染和打补丁，在这之后会调用该钩子。
		 * 当这个钩子被调用时，组件 DOM 已经更新，所以你现在可以执行依赖于 DOM 的操作。
		 */
		updated() {},
		/**
		 * keep-alive 组件激活时调用。 仅针对keep-alive 组件有效
		 */
		activated() {},
		/**
		 * keep-alive 组件停用时调用。 仅针对keep-alive 组件有效
		 */
		deactivated() {},
		/**
		 * 实例销毁之前调用。在这一步，实例仍然完全可用。
		 */
		beforeDestroy() {},
		/**
		 * Vue 实例销毁后调用。调用后，Vue 实例指示的所有东西都会解绑定，
		 * 所有的事件监听器会被移除，所有的子实例也会被销毁。
		 */
		destroyed() {}
	}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<!--使用了scoped属性之后，父组件的style样式将不会渗透到子组件中，-->
<!--然而子组件的根节点元素会同时被设置了scoped的父css样式和设置了scoped的子css样式影响，-->
<style scoped lang="scss">
	.mine {
		width: 100%;
		height: 100%;

		padding-top: $nav-top-height;


		.vip-level {
			background: url(../../static/img/level-bg.png);
			background-size: cover;
		}

		.bg {
			z-index: -1;
			width: 100%;
			height: 640rpx;
			position: absolute;
			left: 0;
			top: 0;
			overflow: hidden;

			image {
				width: 100%;
				height: 100%;
				filter: blur(5px);

			}
		}

		&-header {
			width: 100%;
			padding: 0 32rpx;

			&-info {
				margin-top: 40rpx;

				&-left {
					&-ava {
						image {
							width: 120rpx;
							height: 120rpx;
							border-radius: 50%;
						}
					}

					&-content {
						margin-left: 20rpx;

						&-top {
							font-size: 32rpx;
							font-family: PingFang SC-Bold, PingFang SC;
							font-weight: bold;
							color: #FCFEFF;
							margin-bottom: 12rpx;
						}
					}
				}

				&-right {
					font-size: 24rpx;
					font-family: PingFang SC-Medium, PingFang SC;
					font-weight: 500;
					color: #CFDAE5;
				}
			}

			&-sign {
				margin: 32rpx 0;
				font-size: 28rpx;
				font-family: PingFang SC-Medium, PingFang SC;
				color: #FCFEFF;
			}

			&-tab {
				margin-top: 40rpx;

				&-item {
					flex: 1;
					text-align: center;
					font-size: 32rpx;
					font-family: DINPro-Bold, DINPro;
					color: #FCFEFF;
					position: relative;

					&-plus {
						font-size: 20rpx;
						font-family: DINPro-Medium, DINPro;
						font-weight: 500;
						color: #FF3333;
						position: absolute;
						left: 60%;
						top: -20rpx;
						text-align: center;
					}

					&-top {
						font-weight: bold;
						margin-bottom: 4rpx;
					}

					&-down {
						font-weight: 300;
					}
				}
			}

			&-jump {
				position: relative;
				bottom: -30rpx;

				&-left {
					width: 336rpx;
					height: 128rpx;
					background-image: url(../../static/img/mine/open-vip.png);
					background-repeat: no-repeat;
					background-size: cover;
					padding: 20rpx;
					position: relative;

					&-title {
						font-size: 28rpx;
						font-family: PingFang SC-Bold, PingFang SC;
						font-weight: bold;
						color: #4D000E;
						margin-bottom: 12rpx;

						&-btn {
							width: 88rpx;
							height: 40rpx;
							line-height: 40rpx;
							background: #ea9918FF;
							color: #FFFFFF;
							text-align: center;
							font-size: 24rpx;
							border-radius: 44rpx;
							position: absolute;
							top: 12rpx;
							right: 20rpx;
						}
					}

					&-dsc {
						font-size: 24rpx;
						font-family: PingFang SC-Medium, PingFang SC;
						font-weight: 500;
						color: #782735;
					}
				}

				&-right {
					margin-left: 12rpx;
					width: 336rpx;
					height: 128rpx;
					background-image: url(../../static/img/mine/open-candy.png);
					background-repeat: no-repeat;
					background-size: cover;
					padding: 20rpx;
					position: relative;

					&-title {
						font-size: 28rpx;
						font-family: PingFang SC-Bold, PingFang SC;
						font-weight: bold;
						color: #4D000E;
						margin-bottom: 12rpx;

						&-btn {
							width: 88rpx;
							height: 40rpx;
							line-height: 40rpx;
							background: #ea6418FF;
							color: #FFFFFF;
							text-align: center;
							font-size: 24rpx;
							border-radius: 44rpx;
							position: absolute;
							top: 12rpx;
							right: 20rpx;
						}
					}

					&-dsc {
						font-size: 24rpx;
						font-family: PingFang SC-Medium, PingFang SC;
						font-weight: 500;
						color: #782735;
					}
				}
			}
		}

		.mine-main {
			padding: 0 32rpx;
			background: #FBFBFBFF;
		}
	}
</style>
